package com.lumingfeng.serviceImpl;

import com.lumingfeng.dao.IUserDao;
import com.lumingfeng.dao.InDao;
import com.lumingfeng.entity.In;
import com.lumingfeng.service.InService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by chengyin on 16/8/16.
 */
@Service(value = "inService")
public class InServiceImpl implements InService {

    @Resource
    private InDao inDao;
    @Resource
    private IUserDao iUserDao;

    public In selectByPrimaryKey(Integer id) {
//        In in = inDao.selectByPrimaryKey(id);
//        in.setSalerModel(iUserDao.selectByPrimaryKey(in.getSaler()));
        return inDao.selectByPrimaryKey(id);
    }

    public List<In> select() {
        return inDao.select();
    }

    public Integer add(In in) {
        return inDao.add(in);
    }

    public Integer save(In in) {
        return inDao.save(in);
    }
}
